﻿<Page x:Class="AP.Panacea.Windows.DemoApp.MasterPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:ap="clr-namespace:AP.Panacea.Windows;assembly=AP.Panacea.Windows"
      mc:Ignorable="d" 
      d:DesignHeight="400" d:DesignWidth="1000"
	Title="MasterPage">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="140" />
            <ColumnDefinition Width="*" />            
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="20" />
            <RowDefinition Height="*" />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        <TextBox x:Name="AddressBar" Grid.Row="0" Grid.ColumnSpan="2" Text="{Binding Source={x:Static Application.Current}, Mode=OneWay, Path=CurrentUri.Path}" />    
        <TreeView x:Name="Menu" SelectedItemChanged="Menu_SelectedItemChanged" Grid.Row="1"  ><!-- todo: bind the treeview to the sitemap -->
            <TreeViewItem Header="Home">
                <TreeViewItem Header="About" />                    
                <TreeViewItem Header="News" />
            </TreeViewItem>            
        </TreeView>
        <Frame x:Name="MainContent" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Source="HomePage.xaml" NavigationUIVisibility="Hidden" />
        <TextBlock x:Name="Footer" Grid.Row="2" Grid.ColumnSpan="2" RenderTransformOrigin="0.5,0.5">
            powered by AP - www.andreas-prechtl.net
        </TextBlock>          
    </Grid>
</Page>
